package com.poet.df.dbinfo.pojo;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 代表数据库中的一个表
 * @author xuchenglong
 *
 */
public class Table {

	/**
	 * 表名称
	 */
	private String tableName;
	/**
	 * 表类型
	 */
	private String tableType;
	/**
	 * catalog 指的是哪个数据库
	 */
	private String catalog;
	/**
	 * schema Oracle代表用户名称
	 */
	private String schema;
	/**
	 * 备注
	 */
	private String remarks;

	/**
	 * 表中的所有列，包括主键和外键
	 * key : 列明
	 * value : column对象
	 */
	private Map<String, Column> columns = new LinkedHashMap<String, Column>();
	/**
	 * 表中所有的主键
	 * key:列明
	 * value:主键对象
	 */
	private Map<String, PrimaryKey> primaryKeys = new LinkedHashMap<String, PrimaryKey>();
	/**
	 * 表中所有的外键
	 * key:列明
	 * value:外键对象
	 */
	private Map<String, ForeignKey> foreignKeys = new HashMap<String, ForeignKey>();

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public String getTableType() {
		return tableType;
	}

	public void setTableType(String tableType) {
		this.tableType = tableType;
	}

	public String getCatalog() {
		return catalog;
	}

	public void setCatalog(String catalog) {
		this.catalog = catalog;
	}

	public String getSchema() {
		return schema;
	}

	public void setSchema(String schema) {
		this.schema = schema;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Map<String, Column> getColumns() {
		return columns;
	}

	public Map<String, PrimaryKey> getPrimaryKeys() {
		return primaryKeys;
	}

	public void setPrimaryKeys(Map<String, PrimaryKey> primaryKeys) {
		this.primaryKeys = primaryKeys;
	}

	public Map<String, ForeignKey> getForeignKeys() {
		return foreignKeys;
	}

}
